package com.beasts.ant.auth.config.cxf;

import javax.xml.ws.Endpoint;

import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.beasts.ant.auth.service.cxf.IntegrateService;

/**
 * Webservice初始化配置
 *
 * @author dangzw
 * @date 01/05/2018 2:28 PM
 * @since 1.0
 */
@Configuration
public class CxfConfig {

    @Autowired
    Bus bus;


    @Autowired
    IntegrateService integrateService;

    /** JAX-WS **/
    @Bean
    public Endpoint endpoint() {
        EndpointImpl endpoint = new EndpointImpl(bus, integrateService);
        endpoint.publish("/IntegrateService");
        return endpoint;
    }
}
